package com.itheima.HomeWork.homework03;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

class Demo01 {
    public static void main(String[] args) {
        try {
            ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("obj.txt"));
            oos.writeObject(new User());
            oos.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}